package cn.deepmax.spring.cloud.system.user.mapper;

import cn.deepmax.spring.cloud.system.user.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface UserMapper {

    /**
     * test of Tag: where, if, choose
     * @param name
     * @param pass
     * @param type
     * @return
     */
    List<User> findAllByName(@Param(value = "qName") String name,
                             @Param(value = "qPass") String pass,
                             @Param(value = "orderBy")String type);

    User findUser(Long id);

    User findUserByNameAndPassword(@Param(value = "name") String name, @Param(value = "password") String password);

    User findByName(@Param(value = "name")String name);

    void save(User user);

}
